home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / repeafs4.zip / REPEAT.DOC < prev   
Text File  |  1993-01-13  |  3KB  |  90 lines

  1.                    Repeating Objects in .SC1 files
  2.                    ===============================
  3.  
  4. By:  Andrew Tuline
  5.  
  6. CIS: 70465,1223  (or 70742,3176)
  7.  
  8. Date:  10 Jan 93
  9.  
  10. Problem
  11. -------
  12. You have created an object with SEE4 or A&AF, imported it into your .SC1
  13. file.  You then modified the range via SEE4, and the object is now seen
  14. in multiple locations.
  15.  
  16. Current Workaround
  17. ------------------
  18. The published workaround for this would be as follows with SEE4.
  19.  
  20. '--------[SEE4 file starts here]--------
  21. INPUT, customaa.SC1, OUTPUT, customa$.SC1
  22.  
  23. north, 1234
  24. east, 5678
  25. library, object                  'a 1/4 size .SC0 file to be imported
  26.  
  27. find, exact, 8, last
  28. x4                               'increase size*4, AND non-repeating range*4
  29. range, 20                        'new, higher range value (FSu)
  30. adjust
  31. save
  32. '--------[SEE4 file ends here]----------
  33.  
  34. Sample Objects
  35. ---------------
  36. (Note: All values are in FSu's and 1 FSu=256 meters)
  37.  
  38. .SC0 files created with A&AF have a maximum non-repeating range of 7 and
  39. .SC0 files created with SEE4 have a maximum non-repeating range of 127.
  40.  
  41. For some objects, these values can be too low.  I wanted to create some fake
  42. mountains using polygons.  The range would then have to be about 1000.  I used
  43. the above workaround to create my mountains.  This is even worse when trying
  44. to design objects with A&AF.  For instance, I'm currently designing a landable
  45. aircraft carrier.  It will definitely need a longer range than 7.
  46.  
  47. What is happening
  48. -----------------
  49. I used FSDECODE by Maurizio M. Gavioli to analyze a very simple .SC1 file.
  50.  
  51.         fsdecode file.sc1 file.doc /Dsc1.des
  52.  
  53. Each .SC1 record starts out with a '0x3E' descriptor of the object, and about
  54. 0x14 bytes into the object record is followed by a '0x24' Reference Point.
  55.  
  56. (.SCN files don't need this overhead for each object, but this discussion is
  57.  for another day.)
  58.  
  59. The 0x3E descriptor contains the range that you specified in SEE4.  The second
  60. byte in the 0x24 reference point contains the maximum allowable (ie.
  61. non-repeatable) range for that object.  Values can be as follows:
  62.  
  63. 02 = Range of 7          (4*4/2)-1
  64. 03 = Range of 31         (4*4*4/2)-1
  65. 04 = Range of 127        (4*4*4*4/2)-1
  66.      ...
  67.                       x
  68. The formula would be 4 /2 - 1.
  69.  
  70. By modifying this value, you can create anomalies as in clouds.zip or remove
  71. them.  You would need a program such as Norton's Diskedit or DOS's debug to
  72. modify your file.  Add 0x100 to the offset in debug.
  73.  
  74. One way of modifying an object is to export it to a .ELE file with SEE4,
  75. analyze with FSDECODE as follows:
  76.  
  77.     fsdecode object.ele object.doc /Dstatrecs.des
  78.  
  79. I modify the .ELE file and re-import it into SEE4.
  80.     
  81.  
  82. Additional notes:
  83. -----------------
  84. Note that addresses 0x32 to 0x90 in a .SC1 file with a single A&AF object
  85. in it contains several jumps.  These are probably only useful if the object
  86. is the plane you're flying.  I've successfully (and carefully) removed this
  87. code without problems, thus saving valuable .SC1 space.
  88.  
  89.                        Good luck designing & decoding!
  90.